package com.xinghou.platform.file.model;

import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;

public class BaseResponse<T> {
	
	private String errInfo;

	private HttpHeaders responseHeaders = new HttpHeaders();
	
	private HttpStatus statusCode;
	
	private T body;
	
	/**
	 *  0  正确返回 http code=200
	 * >0  逻辑错误 http code=200
	 * <0  系统错误 
	 */
	private int resultCode;

	public HttpHeaders getResponseHeaders() {
		return responseHeaders;
	}

	public void setStatusCode(HttpStatus statusCode) {
		this.statusCode = statusCode;
	}

	public HttpStatus getStatusCode() {
		return statusCode;
	}

	public T getBody() {
		return body;
	}

	public void setBody(T body) {
		this.body = body;
	}

	public void setResponseHeaders(HttpHeaders responseHeaders) {
		this.responseHeaders = responseHeaders;
	}

	public String getErrInfo() {
		return errInfo;
	}

	public void setErrInfo(String errInfo) {
		this.errInfo = errInfo;
	}

	public int getResultCode() {
		return resultCode;
	}

	public void setResultCode(int resultCode) {
		this.resultCode = resultCode;
	}
	
}
